<!DOCTYPE html >
<html>
    <head>
        <meta name="Generator" content="TPshop v1.1" />
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
        <title>首页-{$tpshop_config['shop_info_store_title']}</title>
        <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
        <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
        <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
        <link rel="stylesheet" type="text/css" href="__STATIC__/css/public.css"/>
        <link rel="stylesheet" type="text/css" href="__STATIC__/css/index.css"/>
        <script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
        <script type="text/javascript" src="__STATIC__/js/TouchSlide.1.1.js"></script>
        <script type="text/javascript" src="__STATIC__/js/jquery.json.js"></script>
        <script type="text/javascript" src="__STATIC__/js/touchslider.dev.js"></script>
        <script type="text/javascript" src="__STATIC__/js/layer.js" ></script>
        <script src="__PUBLIC__/js/global.js"></script>
        <script src="__PUBLIC__/js/mobile_common.js"></script>

    </head>
    <body>
        <div id="page" class="showpage">
            <div>
                <header id="header"> 
                    <a href="{:U('Goods/categoryList')}" class="top_bt"></a><a href="{:U('Cart/cart')}" class='user_btn'></a>
                    <span href="javascript:void(0)" class="logo">{$tpshop_config['shop_info_store_name']}</span> 
                </header>

                <div id="scrollimg" class="scrollimg">
                    <div class="bd">
                        <ul>
                            <adv pid ="2" limit="5" item="v">
                                <li><a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> ><img src="{$v[ad_code]}" title="{$v[title]}"width="100%" style="{$v[style]}"/></a></li>
                            </adv>                        
                        </ul>
                    </div>
                    <div class="hd">
                        <ul></ul>
                    </div>
                </div>
                <script type="text/javascript">
                    TouchSlide({
                    slideCell:"#scrollimg",
                            titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                            mainCell:".bd ul",
                            effect:"leftLoop",
                            autoPage:true, //自动分页
                            autoPlay:true //自动播放
                    });
                </script> 
                <div id="fake-search" class="index_search">
                    <div class="index_search_mid">
                        <span><img src="__STATIC__/images/xin/icosousuo.png"></span>
                        <input  type="text" id="search_text" class="search_text" value="请输入您所搜索的商品"/>
                    </div>
                </div>
                <div class="entry-list clearfix">
                    <nav>
                        <ul>
                            <li>
                                <a href="{:U('Goods/categoryList')}">
                                    <img alt="全部分类" src="__STATIC__/images/1440437165699930301.png" />
                                    <span>全部分类</span>
                                </a>
                            </li>		 
                            <li>
                                <a href="{:U('Activity/group_list')}">
                                    <img alt="我的订单" src="__STATIC__/images/1440439318451279676.png" />
                                    <span>团购</span>
                                </a>
                            </li>
                            <li>
                                <a href="{:U('Cart/cart')}">
                                    <img alt="购物车" src="__STATIC__/images/1440439353048484531.png" />
                                    <span>购物车</span>
                                </a>
                            </li>
                            <li>
                                <a href="{:U('User/index')}">
                                    <img alt="个人中心" src="__STATIC__/images/1440439367001464442.png" />
                                    <span>个人中心</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>

                <div class="floor_images">
                    <dl>
                        <dt>
                        <adv  limit="1" item="v" pid="300">        
                            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                            </a> 
                        </adv>              
                        </dt>    
                        <dd> 
                            <span class="Edge">
                                <adv  limit="1" item="v" pid="301">            
                                    <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                        <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                                    </a>
                                </adv>
                            </span> 
                            <span>
                                <adv  limit="1" item="v" pid="302">
                                    <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                        <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                                    </a>
                                </adv>           
                            </span> 
                        </dd>
                    </dl>
                    <ul>
                        <li class="brom">
                        <adv  limit="1" item="v" pid="303">
                            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                            </a>
                        </adv>        
                        </li>
                        <li>
                        <adv  limit="1" item="v" pid="304">
                            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                            </a>
                        </adv>        
                        </li>
                    </ul>
                </div>
                <script>
                    // 倒计时
                    function GetRTime2(){
                    //var text = GetRTime('2016/02/27 17:34:00');
                    <tpshop sql = "select * from __PREFIX__goods as g inner join __PREFIX__flash_sale as f on g.goods_id = f.goods_id limit 3" key = "k" item = 'v' >
                            var text{$v[goods_id]} = GetRTime('{$v.end_time|date="Y/m/d H:i:s",###}');
                    if (typeof (text{$v[goods_id]}) == "undefined")
                            $("#surplus_text{$v[goods_id]}").text('活动已结束');
                    else
                            $("#surplus_text{$v[goods_id]}").text(text{$v[goods_id]});
                    </tpshop>
                    }
                    setInterval(GetRTime2, 1000);
                </script>
                <section class="index_floor_lou">
                    <div class="floor_body">
                        <h2>
                            <em></em>促销商品<div class="geng"><a href="{:U('Goods/search',array('q'=>'促销'))}">更多</a><span></span></div>
                        </h2>
                        <div id="scroll_promotion">
                            <ul>
                                <tpshop sql="select * from __PREFIX__goods as g inner join __PREFIX__flash_sale as f on g.goods_id = f.goods_id limit 3" key="key" item='val'>
                                    <li>
                                        <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$val.goods_name}"></a>
                                        <div class="index_pro">
                                            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$val[goods_id]))}" title="{$val.goods_name}"> 
                                                <div class="products_kuang">
                                                    <div class="timerBox" id="surplus_text{$val[goods_id]}">1时 59分 59秒</div>
                                                    <img src="{$val.goods_id|goods_thum_images=400,400}">
                                                </div>
                                                <div class="goods_name">{$val.goods_name}</div>
                                            </a>
                                            <div class="price">
                                                <a href="javascript:AjaxAddCart({$val[goods_id]},1,0);" class="btns">
                                                    <img src="__STATIC__/images/index_flow.png">
                                                </a>
                                                <span class="price_pro">￥{$val.price}元</span>
                                            </div>
                                        </div>
                                    </li>
                                </tpshop>
                            </ul>
                        </div>
                    </div>
                </section>

                <div class="floor_images">
                    <dl>
                        <dt>
                        <adv  limit="1" item="v" pid="305">
                            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                            </a>
                        </adv>        
                        </dt>
                        <dd> 
                            <span class="Edge">
                                <adv  limit="1" item="v" pid="306">
                                    <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                        <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                                    </a>
                                </adv>        
                            </span> 
                            <span>
                                <adv  limit="1" item="v" pid="307">
                                    <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                        <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                                    </a>
                                </adv>        
                            </span> 
                        </dd> 
                    </dl>
                    <strong>
                        <adv  limit="1" item="v" pid="308">
                            <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                            </a>
                        </adv>
                    </strong>
                </div>

                <section class="index_floor">
                    <div class="floor_body1">
                        <h2><em></em>精品推荐<div class="geng"> <a href="{:U('Goods/search',array('q'=>'精品'))}">更多</a> <span></span></div></h2>
                        <div id="scroll_best" class="scroll_hot">
                            <div class="bd">
                                <ul>
                                    <assign name="fl" value="1"/>
                                    <tpshop sql="select * from __PREFIX__goods where is_recommend=1 order by sort limit 9" item="v" key="k">
                                        <li>
                                            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$v.goods_name}">
                                                <div class="index_pro"> 
                                                    <div class="products_kuang">
                                                        <img src="{$v.goods_id|goods_thum_images=400,400}"></div>
                                                    <div class="goods_name">{$v.goods_name}</div>
                                                    <div class="price">
                                                        <a href="javascript:AjaxAddCart({$v[goods_id]},1,0);" class="btns">
                                                            <img src="__STATIC__/images/index_flow.png">
                                                        </a>
                                                        <span href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" class="price_pro">￥{$v.shop_price}元</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li>
                                        <if condition="($fl++%3 eq 0) && ($fl lt 9)"></ul><ul></if>
                                    </tpshop>
                                </ul>
                            </div>
                            <div class="hd">
                                <ul></ul>
                            </div>
                        </div>
                    </div>
                </section>
                <script type="text/javascript">
                    TouchSlide({
                    slideCell:"#scroll_best",
                            titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                            effect:"leftLoop",
                            autoPage:true, //自动分页
                            //switchLoad:"_src" //切换加载，真实图片路径为"_src" 
                    });
                </script>
                <section class="index_floor">
                    <div class="floor_body1" >
                        <h2>
                            <em></em>
                            新品上市      <div class="geng"><a href="{:U('Goods/search',array('q'=>'新品'))}" >更多</a> <span></span></div>
                        </h2>
                        <div id="scroll_new" class="scroll_hot">
                            <div class="bd">
                                <ul>
                                    <assign name="fl" value="1"/>
                                    <tpshop sql="select * from __PREFIX__goods where is_new=1 order by sort limit 9" item="v" key="k">
                                        <li>
                                            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$v.goods_name}">
                                                <div class="index_pro"> 
                                                    <div class="products_kuang">
                                                        <img src="{$v.goods_id|goods_thum_images=400,400}"></div>
                                                    <div class="goods_name">{$v.goods_name}</div>
                                                    <div class="price">
                                                        <a href="javascript:AjaxAddCart({$v[goods_id]},1,0);" class="btns">
                                                            <img src="__STATIC__/images/index_flow.png">
                                                        </a>
                                                        <span href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" class="price_pro">￥{$v.shop_price}元</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li>
                                        <if condition="($fl++%3 eq 0) && ($fl lt 9)"></ul><ul></if>
                                    </tpshop></ul>
                            </div>
                            <div class="hd">
                                <ul></ul>
                            </div>
                        </div>
                    </div>
                </section>
                <script type="text/javascript">
                    TouchSlide({
                    slideCell:"#scroll_new",
                            titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                            effect:"leftLoop",
                            autoPage:true, //自动分页
                            //switchLoad:"_src" //切换加载，真实图片路径为"_src" 
                    });
                </script>
                <section class="index_floor">
                    <div class="floor_body1" >
                        <h2><em></em>热销商品<div class="geng"><a href="{:U('Goods/search',array('q'=>'热销'))}" >更多</a> <span></span></div></h2>
                        <div id="scroll_hot" class="scroll_hot">
                            <div class="bd">
                                <ul>
                                    <assign name="fl" value="1"/>
                                    <tpshop sql="select * from __PREFIX__goods where is_hot=1 order by sort limit 9" item="v" key="k">
                                        <li>
                                            <a href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$v.goods_name}">
                                                <div class="index_pro"> 
                                                    <div class="products_kuang">
                                                        <img src="{$v.goods_id|goods_thum_images=400,400}"></div>
                                                    <div class="goods_name">{$v.goods_name}</div>
                                                    <div class="price">
                                                        <a href="javascript:AjaxAddCart({$v[goods_id]},1,0);" class="btns">
                                                            <img src="__STATIC__/images/index_flow.png">
                                                        </a>
                                                        <span href="{:U('Mobile/Goods/goodsInfo',array('id'=>$v[goods_id]))}" class="price_pro">￥{$v.shop_price}元</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li>
                                        <if condition="($fl++%3 eq 0) && ($fl lt 9)"></ul><ul></if>
                                    </tpshop></ul>
                            </div>
                            <div class="hd">
                                <ul></ul>
                            </div>
                        </div>
                    </div>
                </section>
                <script type="text/javascript">
                    TouchSlide({
                    slideCell:"#scroll_hot",
                            titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                            effect:"leftLoop",
                            autoPage:true, //自动分页
                            //switchLoad:"_src" //切换加载，真实图片路径为"_src" 
                    });
                </script>


                <section class="index_floor_lou">
                    <div class="floor_body ">
                        <h2>
                            <em></em><div class="geng"><a href="javascript:void(0);" >更多</a> <span></span></div>
                        </h2>
                        <ul>
                        </ul>
                    </div>
                </section> 

                <div id="index_banner" class="index_banner">
                    <div class="bd">
                        <ul>
                            <adv  limit="2" item="v" pid="309">
                                <li>
                                    <a href="{$v.ad_link}" <if condition="$v['target'] eq 1">target="_blank"</if> >
                                        <img src="{$v[ad_code]}" title="{$v[title]}" style="{$v[style]}" border="0">
                                    </a>
                                </li>
                            </adv>        
                        </ul>
                    </div>
                    <div class="hd">
                        <ul>         
                        </ul>
                    </div>
                </div>
                <script type="text/javascript">
                    TouchSlide({
                    slideCell:"#index_banner",
                            titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                            mainCell:".bd ul",
                            effect:"leftLoop",
                            autoPage:true, //自动分页
                            autoPlay:true //自动播放
                    });
                </script>

                <script type="text/javascript">
                    var url = "index.php?m=Mobile&c=Index&a=ajaxGetMore";
                    $(function(){
                    //$('#J_ItemList').more({'address': url});
                    getGoodsList();
                    });
                    var page = 1;
                    function getGoodsList(){
                    $('.get_more').show();
                    $.ajax({
                    type : "get",
                            url:"/index.php?m=Mobile&c=Index&a=ajaxGetMore&p=" + page,
                            dataType:'html',
                            success: function(data)
                            {
                            if (data){
                            $("#J_ItemList>ul").append(data);
                            page++;
                            $('.get_more').hide();
                            } else{
                            $('.get_more').hide();
                            $('#getmore').remove();
                            }
                            }
                    });
                    }
                </script> 
                <div class="floor_body2" >
                    <h2>————&nbsp;猜你喜欢&nbsp;————</h2>
                    <div id="J_ItemList">
                        <ul class="product single_item info">
                        </ul>
                        <a href="javascript:;" class="get_more" style="text-align:center; display:block;"> 
                            <img src='__STATIC__/images/category/loader.gif' width="12" height="12"> </a> 
                    </div>
                    <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem;">
                        <a href="javascript:void(0)" onClick="getGoodsList()">点击加载更多</a>
                    </div>
                </div>
                <include file="Public/footer"/>
                <script>
                    function goTop(){
                    $('html,body').animate({'scrollTop':0}, 600);
                    }
                </script>
                <a href="javascript:goTop();" class="gotop"><img src="__STATIC__/images/topup.png"></a> 
            </div>


            <div id="search_hide" class="search_hide">
                <h2> <span class="close"><img src="__STATIC__/images/close.png"></span>关键搜索</h2>
                <div id="mallSearch" class="search_mid">
                    <div id="search_tips" style="display:none;"></div>
                    <ul class="search-type">
                        <li  class="cur"  num="0">宝贝</li>
                        <!--<li  num="1">店铺</li>-->
                    </ul>	
                    <div class="searchdotm"> 
                        <form class="set_ip"name="sourch_form" id="sourch_form" method="post" action="{:U('Goods/search')}">
                            <div class="mallSearch-input">
                                <div id="s-combobox-135">
                                    <input class="s-combobox-input" name="q" id="q"  placeholder="请输入关键词"  type="text" value="<?php echo I('q'); ?>" />
                                </div>                                                
                                <input type="button" value="" class="button"  onclick="if ($.trim($('#q').val()) != '') $('#sourch_form').submit();" />
                            </div>
                        </form>
                    </div> 
                </div>           
                <section class="mix_recently_search"><h3>热门搜索</h3>
                    <ul>
                        <foreach name="tpshop_config.hot_keywords" item="wd" key="k">
                            <li><a href="{:U('Goods/search',array('q'=>$wd))}" <if condition="$k eq 0">class="ht"</if>>{$wd}</a></li>
                        </foreach>         
                    </ul>
                </section>
            </div>

        </div>
    <include file="Public/footer_nav"/>

    <script type="text/javascript">
        $(function() {
        $('#search_text').click(function(){
        $(".showpage").children('div').hide();
        $("#search_hide").css('position', 'fixed').css('top', '0px').css('width', '100%').css('z-index', '999').show();
        })
                $('#get_search_box').click(function(){
        $(".showpage").children('div').hide();
        $("#search_hide").css('position', 'fixed').css('top', '0px').css('width', '100%').css('z-index', '999').show();
        })
                $("#search_hide .close").click(function(){
        $(".showpage").children('div').show();
        $("#search_hide").hide();
        })
        });
    </script>
    <script>
        $('.search-type li').click(function() {
        $(this).addClass('cur').siblings().removeClass('cur');
        $('#searchtype').val($(this).attr('num'));
        });
        $('#searchtype').val($(this).attr('0'));
    </script>
    <script src="__PUBLIC__/js/jqueryUrlGet.js"></script><!--获取get参数插件-->
    <script> set_first_leader(); //设置推荐人 </script>
</body>
</html>